#include <iostream>
using namespace std;

/**
 * 运算符重载：：++ 和 -- 运算符重载
*/

class Test{
    public:
        int num = 10;

        int operator++(){
            return ++num;
        };

        int operator++(int){
            return num++;
        };
};

int main(){
    Test t1;
    // ++t1:11, t1.num:11
    cout << "++t1:" << ++t1 << ", " << "t1.num:" << t1.num << endl;

    Test t2;
    // t2++:10, t2.num:11
    cout << "t2++:" << t2++ << ", " << "t2.num:" << t2.num << endl;
    
}